Skip to content

Conversation

@rossbar
Copy link
Contributor

@rossbar rossbar commented Nov 22, 2024

I just took a walk through the contributor guide and noticed it appears to be out-of-sync with the current structure of the repo.

I went ahead and made some minor tweaks to get things working again, but someone with knowledge of any recent restructuring should give the whole document a once-over!

$ source ~/pyenv/zarr-dev/bin/activate
$ pip install -r requirements_dev_minimal.txt -r requirements_dev_numpy.txt
$ pip install -e .[docs]
$ pip install -e .[test,docs]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There don't appear to be requirements files anymore, so I assume that the optional-dependencies is the intended replacement - not sure how these intersect requirements_dev_minimal and requirements_dev_numpy but these appear to be the minimal ones to run the tests and build the docs!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using hatch now to manage our development environments. I think we should replace the virtual env directions with instructions on how to use hatch.

To verify that your development environment is working, you can run the unit tests::

$ python -m pytest -v zarr
$ python -m pytest -v tests
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there's been a src/tests split since this was written, so the original recommendation no longer applies. This should work and be portable, but feel free to replace with whichever incantation is preferred!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the standard invocation is hatch env run run (perhaps we should change this to hatch env run tests?)

the tests will be skipped. To install all optional dependencies, run::

$ pip install -r requirements_dev_optional.txt
$ pip install pytest-doctestplus
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see pytest-doctestplus listed anywhere in the optional dependencies, and I don't know what else may have been in requirements_dev_optional.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be pro putting this in the test dependencies section, and then not having any optional dependencies for testing? That way it's a bit simpler.

Copy link
Contributor

@dstansby dstansby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - this looks great. Just one suggestion to improve things by dropping having optional test dependencies.

@jhamman jhamman added the V3 label Nov 29, 2024
Copy link
Contributor

@dstansby dstansby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is an improvement over the status quo, I'm going to merge - thanks for the PR! @jhamman if it's best to switch the guide over to using hatch throughout, perhaps that could be done in a separate PR?

@dstansby
Copy link
Contributor

dstansby commented Dec 5, 2024

@normanrz this should be a nice test of whether #2521 worked as intended 😄

@normanrz
Copy link
Member

normanrz commented Dec 5, 2024

I just activated the check. So, go ahead and click auto-merge when you're ready.

@dstansby dstansby enabled auto-merge (squash) December 5, 2024 08:14
@dstansby
Copy link
Contributor

dstansby commented Dec 5, 2024

I've squashed and auto-merged, so 🤞

@dstansby dstansby merged commit 2fe12a7 into zarr-developers:main Dec 5, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants